# $Id: PKGBUILD 177019 2013-02-04 08:51:53Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: tardo <tardo@nagi-fanboi.net>

pkgname=ndesk-dbus
pkgver=0.6.0
pkgrel=4
pkgdesc="C# implementation of D-Bus"
arch=('any')
url="http://www.ndesk.org/DBusSharp"
license=('custom')
depends=('mono')
makedepends=('pkgconfig')
options=(!makeflags)
source=(http://www.ndesk.org/archive/dbus-sharp/${pkgname}-${pkgver}.tar.gz
        namespace-support.patch)
md5sums=('5157ba105c9ac491f6e900bc78d1791f'
         '8e4976d0565854de48ee88cd9f929bd9')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np1 -i ../namespace-support.patch
  export MONO_SHARED_DIR="${srcdir}/.wabi"
  mkdir -p "${MONO_SHARED_DIR}"
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -D COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
